Optimal. Leaf size=83 \[ \frac {a (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {i b (c+d x)^2}{2 d}-\frac {i b d \text {Li}_2\left (e^{2 i (e+f x)}\right )}{2 f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {3722, 3717, 2190, 2279, 2391} \[ -\frac {i b d \text {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {a (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {i b (c+d x)^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3717
Rule 3722
Rubi steps
\begin {align*} \int (c+d x) (a+b \cot (e+f x)) \, dx &=\int (a (c+d x)+b (c+d x) \cot (e+f x)) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+b \int (c+d x) \cot (e+f x) \, dx\\ &=\frac {a (c+d x)^2}{2 d}-\frac {i b (c+d x)^2}{2 d}-(2 i b) \int \frac {e^{2 i (e+f x)} (c+d x)}{1-e^{2 i (e+f x)}} \, dx\\ &=\frac {a (c+d x)^2}{2 d}-\frac {i b (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {(b d) \int \log \left (1-e^{2 i (e+f x)}\right ) \, dx}{f}\\ &=\frac {a (c+d x)^2}{2 d}-\frac {i b (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}+\frac {(i b d) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{2 f^2}\\ &=\frac {a (c+d x)^2}{2 d}-\frac {i b (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {i b d \text {Li}_2\left (e^{2 i (e+f x)}\right )}{2 f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 5.04, size = 204, normalized size = 2.46 \[ a c x+\frac {1}{2} a d x^2+\frac {b c (\log (\tan (e+f x))+\log (\cos (e+f x)))}{f}-\frac {b d \csc (e) \sec (e) \left (f^2 x^2 e^{i \tan ^{-1}(\tan (e))}+\frac {\tan (e) \left (i \text {Li}_2\left (e^{2 i \left (f x+\tan ^{-1}(\tan (e))\right )}\right )+i f x \left (2 \tan ^{-1}(\tan (e))-\pi \right )-2 \left (\tan ^{-1}(\tan (e))+f x\right ) \log \left (1-e^{2 i \left (\tan ^{-1}(\tan (e))+f x\right )}\right )+2 \tan ^{-1}(\tan (e)) \log \left (\sin \left (\tan ^{-1}(\tan (e))+f x\right )\right )-\pi \log \left (1+e^{-2 i f x}\right )+\pi \log (\cos (f x))\right )}{\sqrt {\tan ^2(e)+1}}\right )}{2 f^2 \sqrt {\sec ^2(e) \left (\sin ^2(e)+\cos ^2(e)\right )}}+\frac {1}{2} b d x^2 \cot (e) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.52, size = 224, normalized size = 2.70 \[ \frac {2 \, a d f^{2} x^{2} + 4 \, a c f^{2} x - i \, b d {\rm Li}_2\left (\cos \left (2 \, f x + 2 \, e\right ) + i \, \sin \left (2 \, f x + 2 \, e\right )\right ) + i \, b d {\rm Li}_2\left (\cos \left (2 \, f x + 2 \, e\right ) - i \, \sin \left (2 \, f x + 2 \, e\right )\right ) - 2 \, {\left (b d e - b c f\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, f x + 2 \, e\right ) + \frac {1}{2} i \, \sin \left (2 \, f x + 2 \, e\right ) + \frac {1}{2}\right ) - 2 \, {\left (b d e - b c f\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, f x + 2 \, e\right ) - \frac {1}{2} i \, \sin \left (2 \, f x + 2 \, e\right ) + \frac {1}{2}\right ) + 2 \, {\left (b d f x + b d e\right )} \log \left (-\cos \left (2 \, f x + 2 \, e\right ) + i \, \sin \left (2 \, f x + 2 \, e\right ) + 1\right ) + 2 \, {\left (b d f x + b d e\right )} \log \left (-\cos \left (2 \, f x + 2 \, e\right ) - i \, \sin \left (2 \, f x + 2 \, e\right ) + 1\right )}{4 \, f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} {\left (b \cot \left (f x + e\right ) + a\right )}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.11, size = 240, normalized size = 2.89 \[ i b c x -\frac {i b d \polylog \left (2, {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {a d \,x^{2}}{2}+c a x -\frac {2 b c \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}+\frac {b c \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}+\frac {b c \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}-\frac {i b d \,x^{2}}{2}-\frac {i b d \,e^{2}}{f^{2}}-\frac {i b d \polylog \left (2, -{\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {b d \ln \left (1-{\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}+\frac {b d \ln \left (1-{\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}-\frac {2 i b d e x}{f}+\frac {b d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) x}{f}+\frac {2 b d e \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {b d e \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.93, size = 208, normalized size = 2.51 \[ \frac {{\left (a - i \, b\right )} d f^{2} x^{2} + 2 \, {\left (a - i \, b\right )} c f^{2} x - 2 i \, b d f x \arctan \left (\sin \left (f x + e\right ), -\cos \left (f x + e\right ) + 1\right ) + 2 i \, b c f \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right ) - 1\right ) - 2 i \, b d {\rm Li}_2\left (-e^{\left (i \, f x + i \, e\right )}\right ) - 2 i \, b d {\rm Li}_2\left (e^{\left (i \, f x + i \, e\right )}\right ) + {\left (2 i \, b d f x + 2 i \, b c f\right )} \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right ) + 1\right ) + {\left (b d f x + b c f\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1\right ) + {\left (b d f x + b c f\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) + 1\right )}{2 \, f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (a+b\,\mathrm {cot}\left (e+f\,x\right )\right )\,\left (c+d\,x\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \cot {\left (e + f x \right )}\right ) \left (c + d x\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________